# -*- coding: utf-8 -*-
"""
@author: dengpanxiao(@126.com)

@file: normalization.py

@time: 17/8/26 下午8:07

@desc: 各种归一化方法

"""
import statistic
# TODO 线性归一化

# TODO 对数归一化


# 标准化
def std_normalize(x):
    if not x or len(x)==0 :
        return x
    mean = statistic.mean(x)
    std = statistic.std_var(x)
    res = [(_ - mean)/std for _ in x]
    return res
